#!/usr/bin/python
# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException

from com.test.base.page import AccountTest as pageAccount


# from com.test.page import account as pageAccount

# 此目录下的方法都是针对某个业务的基础用例，后续调整
# 账号用例编写
class AccountManagerTest:
    driver = None

    def __init__(self):
        self.driver = webdriver.Chrome();

    def __init__(self, driver):
        self.driver = driver;

    def testLogin(self):
        pageAccount.AccountTest.login(self.driver, "18025329179", "123456")
        return 1

    def testErrorLogin(self):
        try:
            pageAccount.AccountTest.login(self.driver, "aa", "")
        except NoSuchElementException as e:
            return 1
        else:
            return 0
